#include <stdio.h>
#include <conio.h>
#include<easyx.h>
int main()
{
	float width,height,circlex,circley,r,pi=3.1415926,offset=0;
	int i,h;
    
	width=800;
	height=600;

	initgraph(width,height);
	setbkcolor(RGB(125,125,125));
	cleardevice();

	while(1)
	{
		for(circlex=100;circlex<800;circlex+=200)
		{
			for(circley=100;circley<600;circley+=200)
			{
				h=rand()%180;
				for(r=100;r>0;r-=25)
				{
					for(i=0;i<20;i++)
					{
						setfillcolor(HSLtoRGB(h,0.9,0.65));	
						solidpie(circlex-r,circley-r,circlex+r,circley+r,0+i*pi/10+offset,2*pi/60+i*pi/10+offset);
						setfillcolor(RGB(255,255,255));	
						solidpie(circlex-r,circley-r,circlex+r,circley+r,2*pi/60+i*pi/10+offset,3*pi/60+i*pi/10+offset);
						setfillcolor(HSLtoRGB(h+180,0.9,0.65));	
						solidpie(circlex-r,circley-r,circlex+r,circley+r,3*pi/60+i*pi/10+offset,5*pi/60+i*pi/10+offset);
						setfillcolor(HSLtoRGB(0,0,0));	
						solidpie(circlex-r,circley-r,circlex+r,circley+r,5*pi/60+i*pi/10+offset,6*pi/60+i*pi/10+offset);
					}
					offset+=pi/20;
				}
			}
		}
		_getch();
	}
	return 0;
}